const canvas = document.querySelector("#canvas");
const context = canvas.getContext("2d");

const scale = 0.5;
const w = canvas.width;
const h = canvas.height;
const sw = w * scale;
const sh = h * scale;

const img = new Image();

img.src = "./desktop.png";
img.onload = e => {
    context.clearRect(0, 0, canvas.width, canvas.height);
    context.drawImage(img, -sw / 2 + w / 2, -sh / 2 + h / 2, sw, sh);
};
